import request from '@/utils/request'

export function register ({ username, password }) {
  return request.post('/auth/register', { username, password })
}

export function login ({ username, password }) {
  return request.post('/auth/login', { username, password })
}

export function getInfo () {
  return request({
    url: '/system/user/getInfo',
    method: 'get'
  })
}

export function getInfoById (id) {
  return request({
    url: '/system/user/' + id,
    method: 'get'
  })
}
